package airthmetic.exercise.recursion;

public class _509_斐波那契数 {
    public int fib(int n) {
        if(n == 0 || n == 1){
            return n;
        }

        return recur(n);

    }

    public int recur(int n){
        if( n < 2){
            return n;
        }
        return recur(n-1) + recur(n-2);
    }
}
